Enumerated field definition

Overview

Next Design allows you to define input method fields that pick values from a choice. Such fields are called enumerated fields.

The following steps describe the procedure for defining enumerated fields in the following order:

  • Add enumerated fields
  • Delete enumeration definition
  • Change enum settings

Image of enumerated field definition

Enum field definition


Add enumerated fields

There are multiple ways to add enumerated fields:

  • Define enum in class diagram and add fields
  • Define new enum when adding fields

Define the enumeration type in the class diagram and add fields

To add an enumerated field in your class diagram:

Add field by defining enum in class diagram

Operating procedure

  1. Drag and drop [Enum] from the Class Toolbox and enter the name.
  2. [Enum Literal_1] is defined as the first option in the newly added enum type. To change the value of a choice, double-click the choice you want to change, or select it and press F2.
  3. To add a choice to the enumerated type, move the pointer to the value display area of the enumerated type, click the [+] icon displayed in the upper right of the value display area, and enter the value of the choice.
  4. This defines a set of choices as an enum.
  5. To add the defined enumerated type field to the entity, click the [+] icon displayed in the upper right of the field display area of the entity, and click [Add New] as in the case of adding a field to the entity. Open the Fields dialog.
  6. When specifying the data type in the [Add New Fields] dialog, click the [...] button at the right end of [Data Type] to open the Finder, as when specifying an existing entity. ..
  7. Search for the enum in the list on the Finder and click on it to populate the Data Type.
  8. Enter the setting items in the [Add New Fields] dialog and click the [OK] button.
  9. This will add an enumerated field to the entity.

define new enum when adding fields

To define a new enum at the same time you add a field to an entity, do the following:

Define new enum when adding fields

Operating procedure

  1. Open the Add New Fields dialog as you would add a field to an entity.
  2. When specifying the data type in the [Add New Fields] dialog, click [New Enum Type...] from the data type choices to open the [New Enum Type] dialog.
  3. Enter the setting items in the [New Enum Type] dialog.
  4. Enums must have at least one choice. To add choices to the enum, click the + icon at the bottom right of the Enum Literals grid to open the New Enum Literal dialog.
  5. Enter the setting items in the [New Enum Literal] dialog and click the [OK] button to return to the [New Enum Type] dialog and add the options to the enumerated type.
  6. Enter the setting items in the [New Enum Type] dialog and click the [OK] button to return to the [Add New Fields] dialog and enter the enumeration type in [Data Type].
  7. Enter the setting items in the [Add New Fields] dialog and click the [OK] button.
  8. This will define the new enum and add the enum's fields to the entity at the same time.

Delete enumeration type definition

There are multiple ways to remove enums:

  • Remove enum from metamodel
  • Remove enums from class diagram (hide them in metamodel without deleting from metamodel)

remove enums from the metamodel

To remove an enum type from the metamodel, just as you would remove an entity:

Delete enum from metamodel

Operating procedure

  1. If you want to delete the enumerated type used as the data type in the field of the entity, delete the corresponding field beforehand.
  2. Select the desired enum in the class diagram and select Delete From Model from the context menu.
  3. This will remove the target enum from the class diagram as well as from the metamodel and the target enum from the Profile Navigator.

attention

  • If you select the target enumerated type in the class diagram and press the Del key, it will be deleted from the class diagram, not from the metamodel, just like [Delete From Diagram] in the context menu. , Remains on the profile navigator.

You can also remove enums from the metamodel using the following steps:

Other operating procedures

  1. Select the target enumerated type in the Profile Navigator and execute [Delete] from the context menu, or press the Del key.

remove enums from class diagrams

To remove an enum from the class diagram and hide it, follow these steps:

Delete image enumeration type from class diagram

Operating procedure

  1. Select the target enumeration type in the class diagram and execute [Delete From Diagram] from the context menu, or press the Del key.
  2. This removes it from the class diagram but not from the metamodel, leaving the target enumerated type on the Profile Navigator. To display it again in the class diagram, do the same as Metamodel definition> Model structure definition> Add entity> Add existing entity to class diagram. Add to class diagram with.

Change enumerated type settings

To add choices to the enumeration or change the order of the choices, use the Inspector:

Change enum type settings

Operating procedure

  1. Click Display> Pane> Inspector from the ribbon to display the inspector on the right side of the screen.
  2. Select the target enum in the class diagram or profile navigator.
  3. Select Enum Type in the tab at the top of the Inspector.
  4. To add a choice to the enumeration type, click the [+] icon at the bottom right of the [Enum Literals] grid in the [Enum] group, and enter the setting items in the [New Enum Literal] dialog. Click the OK button.
  5. To remove a choice from the enumeration, select the value you want to remove in the Enum Literals grid in the Enum group and click the-icon in the lower right corner.
  6. To change the order of the choices defined in the enum, select the value you want to reorder in the Enum Literals grid in the Enum group and click the ↑ and ↓ icons in the bottom left. I will.